#!/usr/bin/env ruby

require 'json'
require 'rest-client'

LKP_SRC = ENV['LKP_SRC'] || File.direname(File.dirname(File.realpath($PROGRAM_NAME)))

if ENV['RESULT_ROOT']
    fn = File.join ENV['RESULT_ROOT'], 'majun-scan-virus-result'
elsif ARGV[0]
    fn = ARGV[0]
end

stats_json = File.read(fn)
stats = JSON::parse(stats_json)

puts ".result.is_pass: #{stats['isPass']}"
puts ".result.result_url: #{stats['url']}"
